<template>
  <div class="bigbox">
    <!-- 左侧树结构 -->
    <div class="leftbox">

    </div>
    <div class="rightbox">
      <!-- 头部房间信息盒子 -->
      <div class="topbox">
        <span class="span">
          <img src="../../../../assets//Prepaid/ze-checked 1 Copy 1@1x.png" alt="">
          <span class="arr">正常</span>
          <span>xx个</span>
        </span>
        <span class="span">
          <img src="../../../../assets//Prepaid/iconPark-link-cloud-faild 1@1x.png" alt="">
          <span class="arr">离线</span>
          <span>xx个</span>
        </span>
        <span class="span">
          <img src="../../../../assets//Prepaid/riFill-error-warning-fill 1@1x.png" alt="">
          <span class="arr">告警</span>
          <span>xx个</span>
        </span>
        <span class="span">
          <img src="../../../../assets//Prepaid/ze-balance-list-o 1@1x.png" alt="">
          <span class="arr">欠费</span>
          <span>xx个</span>
        </span>
      </div>
      <div class="bodybox">
        <!-- 列表盒子循环 -->
        <div class="boxlist" v-if="isshow">
          <div class="littlebox" v-for="item in 10" :key="item" @click="goback(item)">
            <div class="yonghu name">
              <div class="name">xxxx用户</div>
              <div class="name">xxxx房间</div>
            </div>
            <div class="yonghu">
              <div class="add">xxxxxx电表</div>
              <div class="add"><img src="../../../../assets//Prepaid/ze-checked 1 Copy 1@1x.png" alt=""></div>
            </div>
            <div class="yonghu">
              <div class="add">今日耗电</div>
              <div class="add">xxxx度</div>
            </div>
            <div class="yonghu">
              <div class="add">剩余电费</div>
              <div class="add">xxxx元</div>
            </div>
          </div>
        </div>
        <div v-else style="height: 100%;">
          <!-- 引入组件 -->
         <RoomInformation></RoomInformation>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import RoomInformation from './Room-information.vue'
export default {
  name: 'CallPoliceIndex',
  components: {
    RoomInformation
   },
  data() {
    return {
      isshow:true
    };
  },

  mounted() {
    
  },

  methods: {
    goback(value) {
      console.log(value);
      this.isshow=false
    }
  },
};
</script>

<style lang="scss" scoped>
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.bigbox{
  height: 100%;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  .leftbox{
    width: 300px;
    height: 100%;
    background-color: #fff;
    margin-right: 10px;
  }
  .rightbox{
    flex:1;
    .topbox{
      height: 80px;
      background-color: #fff;
      margin-bottom: 10px;
      line-height: 80px;
      padding: 0 20px;
      font-size: 14px;
      .span{
        margin-right: 20px;
      }
      img{
        vertical-align: middle;
        margin-right: 5px;
      }
      .arr{
        margin-right: 10px;
      }
    }
    .bodybox{
      height: calc(100% - 90px);
      background-color: #fff;
      padding: 20px;
      .boxlist{
        display: flex;
        flex-wrap: wrap;
        .littlebox{
          width: 15.8%;
          height: 120px;
          border: 1px solid #1684FC;
          font-size: 14px;
          padding: 10px;
          margin:0 10px 10px 0;
          .yonghu{
            display: flex;
            justify-content: space-between;
            margin-bottom: 3px;
          }
          .name{
            margin-bottom: 7px;
          }
        }
      }
    }
  }
}
</style>